package com.ryan.route.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 旅游目的地分类
 * </p>
 *
 * @author ryan
 * @since 2020-07-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("travel_dest_category")
@ApiModel(value="DestCategory对象", description="旅游目的地分类")
public class DestCategory implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "目的地类别ID")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "类别名称")
    private String title;

    @ApiModelProperty(value = "父ID")
    private String parentId;

    @ApiModelProperty(value = "排序字段")
    private Integer sort;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    /**
     * 数据库表中不存在的字段，当此字段数据为空时不显示
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist=false)
    private List<DestCategory> children;


}
